﻿if (!document.getElementById) {
	document.getElementById = function() { return null; }
}
function initializeMenu(menuId, actuatorId) {
	var menu = document.getElementById(menuId);
	var actuator = document.getElementById(actuatorId);
	if (menu == null || actuator == null) return;
	actuator.onclick = function() {
		var display = menu.style.display;
		menu.style.display = (display == "block") ? "none" : "block";
		return false;
	}
}
window.onload = function() {
	initializeMenu("productsMenu", "productsActuator");
	initializeMenu("newPhonesMenu", "newPhonesActuator");
	initializeMenu("compareMenu", "compareActuator");
}